<template>
	<view class="content">
		<view class="head">
			<u-grid :col="6" :border="false">
				<u-grid-item>
					<u-avatar :src="webUrl + chatObj.imgUrl" shape="square"></u-avatar>
					<u--text :text="chatObj.chatName"></u--text>
				</u-grid-item>
			</u-grid>
		</view>
		
		<u-gap height="10" bgColor="#f6f7f8"></u-gap>
		
		<view class="head">
			<u-cell-group>
				<u-cell title="查看聊天内容" @click="showSearch">
				</u-cell>
				<u-cell title="设置聊天背景" @click="chooseImg">
				</u-cell>
				<u-cell>
					<view slot="label" class="btn-red">清空聊天记录</view>
				</u-cell>
			</u-cell-group>
		</view>
	</view>
</template>

<script>
	import { mapState, mapMutations } from 'vuex';
	import base from '@/util/baseUrl.js';
	export default {
		data() {
			return {
				webUrl:base.webUrl
			}
		},
		computed:{
			...mapState(['chatObj'])
		}
	}
</script>

<style lang="scss" scoped>
	.head{
		background-color: white;
	}
	.btn-red{
		text-align: center; 
		color: red;
	}
</style>
